package com.cn.jx.common.entity;

import org.hibernate.annotations.GenericGenerator;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

@MappedSuperclass
public abstract class BaseIdEntity implements Serializable{

	private static final long serialVersionUID = 426033381026407679L;
	
	/** <p>定义主键 实现uuid方式的自动生成机制 <p>字段长度64位<p>设置为{@link String String}类型*/
	@Id
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid")
	@Column(length=64)
	private String id;
	
	/** <p>{@link String String}<p>getId()*/
	public String getId() {
		return id;
	}
	
	/** <p>setId({@link String id})*/
	public void setId(String id) {
		this.id = id;
	}
	
}
